home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 621 / text0000.txt < prev   
Encoding:
Text File  |  1996-08-05  |  850 b   |  23 lines

  1. In a message of 07 Jan 96 Magnus Holmgren wrote to Adam@beachyhd.demon.co.:
  2.  
  3.  Abd>> In a program that I'm writing I have a GadTools LISTVIEW gadget. Now
  4.  Abd>> my program -- at any time -- needs to be able to tell which line
  5.  Abd>> number (0 to whatever) is being displayed at the very top of the
  6.  Abd>> listview.
  7.  
  8.  MH> Use the following code:
  9.  
  10.  MH>   if( GadToolsBase->lib_Version < 39 )
  11.  MH>   {
  12.  MH>       top = *( ( UWORD * ) ( ( ( UBYTE * ) listview ) + sizeof( struct
  13.  MH> Gadget ) + 4 ) );
  14.  MH>   }
  15.  
  16. This looks like exactly what I'm after, but on my V39 machine it always printed
  17. the value '7', not the list top. Is this just because I'm using a V39 machine?
  18. (ie, will this still work on V36 - V38?).. I'll have to see if I can find
  19. someone with an A600 so I can test it. :)
  20.  
  21. .\dam.          [Team AMIGA]          //\ ad32@brighton.ac.uk \\/
  22.  
  23.